package pharao.client.views.game.landkarte;

import hmvc4gwt.client.event.IHmvcEvent;
import hmvc4gwt.framework.client.controller.GuiController;
import hmvc4gwt.framework.client.events.AddViewEvent;
import pharao.client.views.game.landkarte.events.RefreshLandkarteEvent;
import pharao.client.views.game.landkarte.events.ShowLandkarteViewEvent;

public class LandkarteController extends GuiController {

	public void initImpl() {
		register(ShowLandkarteViewEvent.class, this);
	}

	public Class getClassOfObject() {
		return LandkarteController.class;
	}

	public void handleEventImpl(IHmvcEvent event) {

		if (event instanceof ShowLandkarteViewEvent) {
			/*
			 * Landkarte anzeigen
			 */
			fireEventLocal(new RefreshLandkarteEvent());
			fireEvent(new AddViewEvent(getView()), true, false, false);

		}
	}

}
